﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="FL.Web.BackEnd.DefineEditForm" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>数据编辑
    </title>
    <link href="../../Styles/form.common.css" rel="stylesheet" />

    <script>var currentUser = (<%=FL.Common.Globals.ObjectToJSON(User)%>);//当前登录人
    </script>

    <script type="text/javascript">
        //主表实体对象
        <% =UIEntityJson %>
        var id = '<%=this.GetStringFromQueryString("id","")%>';
       
        var action = id == "" ? "insert" : "update";
        var dept_id = '<%=this.GetStringFromQueryString("dept_id","")%>';
        var inspect_class_id = '<%=this.GetStringFromQueryString("type","")%>';
        var zclass_id = '<%=this.GetStringFromQueryString("zclass_id","")%>';
        var parent_id = '<%=this.GetStringFromQueryString("parent_id","")%>'; 

        var group_id = '<%=this.GetStringFromQueryString("group_id","")%>';
        
        var del_list = [];
        //用于指定父类的
        if (typeof (instance["parent_id"]) != "undefined" & parent_id != "") {
            instance["parent_id"] = parent_id;
        }
        //用于指定组别ID
        if (typeof (instance["group_id"]) != "undefined" & group_id != "") {
            instance["group_id"] = parent_id;
        }
        //用于指定部门的ID
        if (typeof (instance["dept_id"]) != "undefined" & dept_id != "") {
            instance["dept_id"] = dept_id;
        }
        ////用于商检输入类型
        //if (typeof (instance["inspect_class_id"]) != "undefined" & inspect_class_id != "") {
        //    instance["inspect_class_id"] = inspect_class_id;
        //}
        var const_EditEntity = "<%=EditEntity%>";
        var const_functionId = "<%=FunctionID%>";
    </script>
</head>
<script src="../../SFramework/boot.js"></script>
<script src="../../SFramework/linq.js"></script>
<script src="../../SFramework/linq.min.js"></script>
<script src="../../Scripts/app/datasave.js"></script>
<script src="../../SFramework/Ueditor/ueditor1_4_3_1/ueditor.config.js"></script>
<script src="../../SFramework/Ueditor/ueditor1_4_3_1/ueditor.all.js"></script>
<body>
    <form method="post" id="form1"> 
        <table style="width: 100%;">
            <tr style="display: none">
                <td>
                    <input id="id" name="id" allowinput="true" shownullitem="false"
                        class="mini-textbox" style="width: 90%; display: none" />
                </td>
                <td>
                    <input id="content" name="content" allowinput="true" shownullitem="false"
                        class="mini-textbox" style="width: 100%; display: none" />
                </td>
                <td>
                    <input id="changed_date" name="changed_date" allowinput="true" shownullitem="false"
                        class="mini-textbox" style="width: 90%; display: none" />
                </td>
                <td>
                    <input id="add_time" name="add_time" allowinput="true" shownullitem="false"
                        class="mini-textbox" style="width: 90%; display: none" />
                </td>
            </tr>
            <tr>
                <td class="theader">公告标题</td>
                <td>
                    <input id="title" name="title" allowinput="true" shownullitem="false"
                        class="mini-textbox" style="width: 90%;" />
                </td>
            </tr>
            <tr>
                <td class="theader">有效日期</td>
                <td>
                    <input id="indate" name="indate" allowinput="true" shownullitem="false"
                        class="mini-datepicker" style="width: 25%;" />

                    <input id="client_visible" name="client_visible" allowinput="true"
                        shownullitem="false" class="mini-CheckBox" style="width: 100%;"  />客户系统
                </td>
            </tr>
            <tr>
                <td class="theader">公告内容</td>
                <td style="width: 1050px;">
                    <div id="editor" style="height:360px;">
                       <%-- <script id="editor" type="text/plain">
                        </script>--%>
                    </div>
                </td>
            </tr>
            <tr style="margin-top:50px;">

            </tr>
        </table>
    </form>
    <div class="toolbar">
        <button id="btnSave">保存</button>
        <button id="btnCancel">取消</button>
       
    </div>
</body>
<script src="../../scripts/app/edit.common.js"></script>
<script src="../../Scripts/common/jquery.data.js"></script>
<script src="../../Scripts/app/datasave.js"></script>
<script src="../../scripts/app/edit/t_hr_post_message.edit.js?v=0.1"></script>
<script>
    mini.parse(); 
    $(document).ready(function () {    
        var i = instance.client_visible;
        var ii = i.toLocaleLowerCase();
        var t = mini.get("client_visible");
        t.setChecked(ii);
    });
</script>
<script>
    //var editor = new UE.ui.Editor({ initialFrameHeight:410   });
    var ue = UE.getEditor('editor');
  
</script>
</html>
